<template>
  <div class="person">
    <h2>当前求和为：{{ sum }}，放大100倍后：{{ bigSum }}</h2>
    <button @click="add">点我+1</button>
    <hr/>
    <img v-for="(dog, index) in dogList" :key="index" :src="dog" alt="狗狗"/>
    <br/>
    <button @click="getDog">再来一只小狗</button>
  </div>
</template>

<script setup lang="ts">
import useSum from '@/hooks/useSum.ts';
import useDog from '@/hooks/useDog.ts';

const {sum, bigSum, add} = useSum();
const {dogList, getDog} = useDog();
</script>

<style scoped lang="scss">
.person {
  background-color: skyblue;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;

  button {
    margin: 0 5px;
  }

  img {
    height: 100px;
    margin-right: 10px;
  }
}
</style>
